<!--#index.html-->
<!--head-->
<script>
    $(function() {
        $("#form").ajaxFormEx(function(data) {
            if(data.msg) {
                $("#form .alert").text(data.msg).fadeOut().fadeIn();
            } else {
                window.location.href = "board.html?id=${board.id}"
            }
        })
    })
</script>
<style>
    .topic {
        margin-top: 20px;
    }
    .counts {
        color: white;
        background-color: black;
        text-align: center;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .counts .reply {
        font-size: 24px;
    }
    .counts .view {
        font-size: 16px;
    }
    .topic .author {
        text-align: right;
    }
</style>
<title>${board.name} - wBBS</title>
<!--head end-->
<!--content-->
<div class="pull-right span2">
    <div data-spy="affix" class="span2">
        广告 刚搞光广告 刚搞光广告 刚搞光广告 刚搞光广告 刚搞光广告 刚搞光广告 刚搞光广告 刚搞光广告 刚搞光广告 刚搞光广告 刚搞光广告 刚搞光广告 刚搞光广告 刚搞光广告 刚搞光广告 刚搞光广告 刚搞光广告 刚搞光广告 刚搞光广告 刚搞光
    </div>
</div>
${board.name}
<br/>
帖子列表：
<div w:t="topics" class="row topic">
    <div class="span1 counts">
        <strong class="reply">10</strong>
        <div>回复</div>
        <strong class="view">223</strong>
        <div>浏览</div>
    </div>
    <div class="span9">
        <h4><a href="topic.html?id=${t.id}">${t.title}</a></h4>
        <p>${shorten(t.content, 150)}</p>
        <div class="author">
            <span>${t.postDate.toLocaleString()}</span>
            <a href="">${t.authorId}</a>
        </div>
    </div>
</div>
<div class="pagination">
    <ul>
        <li class="${topics.page>1?'active':null}"><a href="board.html?id=${board.id}&pg=${topics.page-1}" title="上一页">«</a></li>
        <li w:pg="topics.pgs" class="${pg.current?'active':null}"><a href="board.html?id=${board.id}&pg=${pg.page}">${pg.label}</a></li>
        <li class="${topics.page<topics.pageCount?'active':null}"><a href="board.html?id=${board.id}&pg=${topics.page+1}" title="下一页">»</a></li>
    </ul>
</div>
<form action="topic.update" method="post" id="form" class="form-horizontal">
    <input type="hidden" name="topic.boardId" value="${board.id}"/>
    <div class="alert alert-error hide"></div>
    <input name="topic.title" type="text" class="input-xxlarge" placeholder="标题" style="margin-bottom: 10px"/>
    <br/>
    <textarea rows="10" cols="50" name="topic.content" class="input-xxlarge" placeholder="正文" style="margin-bottom: 10px"></textarea>
    <br/>
    <button type="submit" class="btn btn-primary">快速发表</button>
</form>
<!--content end-->
<!--#index.html end-->
